home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / win / pascal / cdfile.exe / CD_VARS.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1992-11-10  |  3.0 KB  |  151 lines

  1. Unit CD_Vars;
  2.  
  3. Interface
  4.  
  5. Type
  6.   ListBuf    = Record
  7.     UnitCode : Byte;
  8.     UnitSeg,
  9.     UnitOfs  : Word;
  10.   end;
  11.   VTOCArray  = Array[1..2048] of Byte;
  12.   DriveByteArray = Array[1..128] of Byte;
  13.  
  14.   Req_Hdr    = Record
  15.      Len     : Byte;
  16.      SubUnit : Byte;
  17.      Command : Byte;
  18.      Status  : Word;
  19.      Reserved: Array[1..8] of Byte;
  20.   End;
  21.  
  22. Const
  23.   Init       = 0;
  24.   IoCtlInput = 3;
  25.   InputFlush = 7;
  26.   IOCtlOutput= 12;
  27.   DevOpen    = 13;
  28.   DevClose   = 14;
  29.   ReadLong   = 128;
  30.   ReadLongP  = 130;
  31.   SeekCmd    = 131;
  32.   PlayCD     = 132;
  33.   StopPlay   = 133;
  34.   ResumePlay = 136;
  35.  
  36. Type
  37.  
  38.   Audio_Play = Record
  39.     APReq    : Req_Hdr;
  40.     AddrMode : Byte;
  41.     Start    : LongInt;
  42.     NumSecs  : LongInt;
  43.   end;
  44.  
  45.   IOControl = Record
  46.     IOReq_Hdr : Req_Hdr;
  47.     MediaDesc : Byte;
  48.     TransAddr : Pointer;
  49.     NumBytes  : Word;
  50.     StartSec  : Word;
  51.     ReqVol    : Pointer;
  52.   End;
  53.  
  54.   ReadControl = Record
  55.     IOReq_Hdr : Req_Hdr;
  56.     AddrMode  : Byte;
  57.     TransAddr : Pointer;
  58.     NumSecs   : Word;
  59.     StartSec  : LongInt;
  60.     ReadMode  : Byte;
  61.     IL_Size,
  62.     IL_Skip   : Byte;
  63.   End;
  64.  
  65.   AudioDiskInfoRec = Record
  66.     LowestTrack    : Byte;
  67.     HighestTrack   : Byte;
  68.     LeadOutTrack   : LongInt;
  69.   End;
  70.  
  71.   PAudioTrackInfo   = ^AudioTrackInfoRec;
  72.   AudioTrackInfoRec = Record
  73.     Track           : Integer;
  74.     StartPoint      : LongInt;
  75.     EndPoint        : LongInt;
  76.     Frames,
  77.     Seconds,
  78.     Minutes,
  79.     PlayMin,
  80.     PlaySec,
  81.     TrackControl    : Byte;
  82.   end;
  83.  
  84.   MSCDEX_Ver_Rec = Record
  85.     Major,
  86.     Minor       : Integer;
  87.   End;
  88.  
  89.   DirBufRec    = Record
  90.      XAR_Len   : Byte;
  91.      FileStart : LongInt;
  92.      BlockSize : Integer;
  93.      FileLen   : LongInt;
  94.      DT        : Byte;
  95.      Flags     : Byte;
  96.      InterSize : Byte;
  97.      InterSkip : Byte;
  98.      VSSN      : Integer;
  99.      NameLen   : Byte;
  100.      NameArray : Array[1..38] of Char;
  101.      FileVer   : Integer;
  102.      SysUseLen : Byte;
  103.      SysUseData: Array[1..220] of Byte;
  104.      FileName  : String[38];
  105.   end;
  106.  
  107.   Q_Channel_Rec = Record
  108.     Control     : Byte;
  109.     Track       : Byte;
  110.     Index       : Byte;
  111.     Minutes     : Byte;
  112.     Seconds     : Byte;
  113.     Frame       : Byte;
  114.     Zero        : Byte;
  115.     AMinutes    : Byte;
  116.     ASeconds    : Byte;
  117.     AFrame      : Byte;
  118.   End;
  119.  
  120. Var
  121.   AudioChannel   : Array[1..9] of Byte;
  122.   RedBook,
  123.   Audio,
  124.   DoorOpen,
  125.   DoorLocked,
  126.   AudioManip,
  127.   DiscInDrive    : Boolean;
  128.   AudioDiskInfo  : AudioDiskInfoRec;
  129.   DriverList     : Array[1..26] of ListBuf;
  130.   NumberOfCD     : Integer;
  131.   FirstCD        : Integer;
  132.   UnitList       : Array[1..26] of Byte;
  133.   MSCDEX_Version : MSCDEX_Ver_Rec;
  134.   QChannelInfo   : Q_Channel_Rec;
  135.   Busy,
  136.   Playing,
  137.   Paused         : Boolean;
  138.   Last_Start,
  139.   Last_End       : LongInt;
  140.   DirBuf         : DirBufRec;
  141.  
  142. Implementation
  143.  
  144. Begin
  145.   FillChar(DriverList, SizeOf(DriverList), #0);
  146.   FillChar(UnitList, SizeOf(UnitList), #0);
  147.   NumberOfCD  := 0;
  148.   FirstCD  := 0;
  149.   MSCDEX_Version.Major := 0;
  150.   MSCDEX_Version.Minor := 0;
  151. end.